<?php
require('../data/mem_config.php');

function create_mem_conn() {
	global $mem_url, $mem_port;
	echo 'mem_url = ' . $mem_url . ' mem_port = ' . $mem_port . '<br />';
	$mem = new Memcache();
	$mem->connect($mem_url, $mem_port);
	return $mem;
}


/*class mem{
	private $url, $port;
	private $mem;
	
	public function __construct($url, $port) {
		$this->url = $url;
		$this->port = $port;
		$mem = new Memcache();
	}	
	
	public function create_mem_connect() {
		$mem->connect($url, $port);	
	}
	
	public function get_value($key) {
		return $mem->get($key);	
	}
	
	public function set_value($key, $value, $flag=0, $expiratime=0) {
		$mem->set($key, $value, $flag, $expiratime);	
	}
}*/
?>